package com.sxjh.entity.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sxjh.entity.PageEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

@Data
@EqualsAndHashCode(callSuper = false)
public class ContractListParam extends PageEntity {

    @ApiModelProperty(value = "合同起始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @ApiModelProperty(value = "合同终止日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    @ApiModelProperty(value = "合同号")
    private String contractNumber;

    @ApiModelProperty(value = "合同种类;0|普通,1|子合同", required = true, example = "0")
    @Min(value = 0, message = "合同种类只能位0或1")
    @Max(value = 1, message = "合同种类只能位0或1")
    private Integer contractKind;

    @ApiModelProperty(value = "产品类别")
    private Integer materialId;

    @ApiModelProperty("产品名称")
    private String materialName;

    @ApiModelProperty("买方公司ID")
    private Integer customerUserId;
    @ApiModelProperty("卖方公司id")
    private Integer sellerCustomerUserId;

    @ApiModelProperty("供应商/客户名称")
    private String companyName;

    @ApiModelProperty("ID")
    private Integer id;

}
